{include file="header"}
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <a href="/admin.php"><div class="layui-logo">网家教育资讯后台管理</div></a>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="{:url("set/index")}" target="main">基本设置</a></li>
      <li class="layui-nav-item">
        <a href="javascript:;"><i class="layui-icon">&#xe857;</i> 已安装插件</a>
        <dl class="layui-nav-child">
          	{volist name=":fun_S('addons',array('has_adminlist'=>1),'id desc','1000',1)" id="vo"}
            <dd><a href="/admin.php/addons/admin/name/{$vo.name}.html" target="main"><i class="layui-icon">&#xe674;</i> {$vo.title}</a></dd>
            {/volist} 
        </dl>
      </li>
      
      <li class="layui-nav-item">
        <a href="javascript:;"><i class="layui-icon">&#xe654;</i> 添加内容</a>
        <dl class="layui-nav-child">
          	{volist name=":fun_S('model',array('open'=>1),'id desc','1000',1)" id="vo"}
            <dd><a href="/admin.php/html_add_id_{$vo.id}.html" target="main">{$vo.title}</a></dd>
            {/volist} 
        </dl>
      </li>
      
        <li class="layui-nav-item update"><a href="javascript:;">清除缓存</a></li>
      <li class="layui-nav-item"><a href="/" target="_blank">网站首页</a></li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="/public/img/touxiang.jpg" class="layui-nav-img">
          {:fun_sc('userAdmin', 'name')}
        </a>
        <dl class="layui-nav-child">
          <dd  class="logi_logout"><a href="javascript:;">退了</a></dd>
        </dl>
      </li>
    </ul>
  </div>
    <input type="checkbox" id="myInput">
    <label id="myInputlabel" for="myInput">
      <span class="bar top"></span>
      <span class="bar middle"></span>
      <span class="bar bottom"></span>
    </label>

    <div class="layui-side layui-bg-black" id="divmy" >
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        {foreach name=":fun_S('cateAdmin',array('open'=>1,'tid'=>0),'px desc','1000',1)" item="v" key="k"}
        <li class="layui-nav-item {$v.lianjie}">
          <a href="javascript:;"><i class="layui-icon">{$v.ico}</i> {$v.name}</a>
          <dl class="layui-nav-child">
          	{volist name=":fun_S('cateAdmin',array('open'=>1,'tid'=>$v['id']),'px desc','1000',1)" id="vo"}
            <dd><a href="{$vo.lianjie}" target="main"><i class="layui-icon">{$vo.ico}</i> {$vo.name}</a></dd>
            {/volist} 
          </dl>
        </li>
        {/foreach} 
        <li class="layui-nav-item {$v.lianjie}">
          <a href="javascript:;"><i class="layui-icon">&#xe857;</i>已安装插件</a>
          <dl class="layui-nav-child">
          	{volist name=":fun_S('addons',array('has_adminlist'=>1),'id desc','1000',1)" id="vo"}
            <dd><a href="/admin.php/addons/admin/name/{$vo.name}.html" target="main"><i class="layui-icon">&#xe674;</i> {$vo.title}</a></dd>
            {/volist} 
          </dl>
        </li>
       <style type="text/css">
          @media only screen and (min-width:800px){
             .dayuyc {display:none!important;} 
          }
       </style>
         <li class="layui-nav-item update dayuyc"><a href="javascript:;"><i class="layui-icon">&#xe665;</i> 清除缓存</a></li>
         <li class="layui-nav-item dayuyc"><a href="/" target="_blank"><i class="layui-icon">&#xe7ae;</i> 网站首页</a></li>
      </ul>
    </div>
  </div>
<script>
$(document).ready(function(){
	$("#myInput").click(function(){
		$("#divmy").fadeToggle();

	});
});
</script>
        <script type="text/javascript">
            layui.use(['layer', 'element', 'jquery', 'form'], function() {
                var layer = layui.layer,
                    element = layui.element,
                    jq = layui.jquery,
                    form = layui.form;
                    
                jq('.update').click(function() {
                    loading = layer.load(2, {
                        shade: [0.2, '#000']
                    });
                    jq.getJSON('{:url("set/update")}', function(data) {
                        if (data.code == 200) {
                            layer.close(loading);
                            layer.msg(data.msg, {
                                icon: 1,
                                time: 1000
                            }, function() {
                                location.reload();
                            });
                        } else {
                            layer.close(loading);
                            layer.msg(data.msg, {
                                icon: 2,
                                anim: 6,
                                time: 1000
                            });
                        }
                    });
                });
                jq('.logi_logout').click(function() {
                    loading = layer.load(2, {
                        shade: [0.2, '#000']
                    });
                    jq.getJSON('{:url("login/logout")}', function(data) {
                        if (data.code == 200) {
                            layer.close(loading);
                            layer.msg(data.msg, {
                                icon: 1,
                                time: 1000
                            }, function() {
                                location.href = '{:url("login/index")}';
                            });
                        } else {
                            layer.close(loading);
                            layer.msg(data.msg, {
                                icon: 2,
                                anim: 6,
                                time: 1000
                            });
                        }
                    });
                });

            });
        </script> 
 <div class="layui-body" style="padding: 0px;">
 <iframe class="admin-iframe" id="admin-iframe" name="main" src="{:url('index/home')}"></iframe>
 </div>
 <div class="layui-footer">
    <!-- 底部固定区域 -->
        © <a href="http://www.115cms.com" target="_blank">网家教育资讯管理系统</a> - 版权所有
 </div>
</div>
{include file="footer"}